﻿
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace WinnerCMS.Data.Mapping
{
    public partial class BrandMap
        : System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<WinnerCMS.Model.Brand>
    {
        public BrandMap()
        {
            // table
            //ToTable("CMS_Brand");

            // keys
            HasKey(t => t.Id);

            // Properties
            Property(t => t.Id)
                
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity)
                .IsRequired();
            Property(t => t.Name)
                
                .HasMaxLength(50)
                .IsOptional();
            Property(t => t.SrcList)
                
                .HasMaxLength(255)
                .IsOptional();
            Property(t => t.SrcDetail)
                
                .HasMaxLength(255)
                .IsOptional();
            Property(t => t.Website)
                
                .HasMaxLength(255)
                .IsOptional();
            Property(t => t.OrderId)
                
                .IsOptional();
            Property(t => t.Content)
                
                .HasMaxLength(1000)
                .IsOptional();
            Property(t => t.IsShow)
                
                .IsOptional();
            Property(t => t.Title)
                
                .HasMaxLength(100)
                .IsOptional();
            Property(t => t.Keywords)
                
                .HasMaxLength(255)
                .IsOptional();
            Property(t => t.Description)
                
                .HasMaxLength(255)
                .IsOptional();
            Property(t => t.Pinyin)
                
                .HasMaxLength(100)
                .IsOptional();
            Property(t => t.Company)
                
                .HasMaxLength(100)
                .IsOptional();

            // Relationships
         

            //InitializeMapping();
        }
    }
}

